home *** CD-ROM | disk | FTP | other *** search
/ Light ROM 1 / LIGHT-ROM 1 (Amiga Library Services)(1994).iso / ffdisks / d886.lha / TrackEd / Sources / ST.c < prev    next >
C/C++ Source or Header  |  1993-07-16  |  724b  |  29 lines

  1.  
  2. /* ST.c  Simple message routine for all OS releases */
  3.  
  4. #include <intuition/intuition.h>
  5.  
  6. extern struct IntuitionBase *IntuitionBase;
  7. extern struct TextAttr  Style;
  8.  
  9. struct IntuiText
  10. Body    = { 0, 1, JAM2, 10, 10, &Style, NULL, NULL },
  11. NegText = { 0, 1, JAM2, 5, 3, &Style, NULL , NULL };
  12.  
  13.  
  14. void ShowText(Window, str1, str2)
  15. struct Window  *Window;
  16. UBYTE  str1[], str2[];
  17. {
  18.    ULONG  Width1, Width2, Height;
  19.  
  20.    Body.IText = str1;
  21.    if (str2) NegText.IText = str2;
  22.    else NegText.IText = (UBYTE *)" OK ";
  23.    Width1 = IntuiTextLength(&Body) + 60;
  24.    Width2 = IntuiTextLength(&NegText) + 60;
  25.    Height = 60;
  26.    if (Width2 > Width1) Width1 = Width2;
  27.    AutoRequest(Window, &Body, NULL, &NegText, 0L, 0L, Width1, Height);
  28. }
  29.